package com.xfn.test;

import com.xfn.Mapper.LoginMapper;
import com.xfn.redis.RedisMapper;
import com.xfn.redis.impl.RedisImpl;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/test")
public class Controller {
    @Autowired(required = false)
    private RedisMapper redisMapper;
    @Autowired(required = false)
    private LoginMapper loginMapper;
    @PostMapping("/redis")
    public JSONObject redisTest(String username,String password){
       /* Map<String,String> map = loginMapper.login(username,password);
        JSONObject jsonObject  = new JSONObject();
        if(map!=null){
            jsonObject.put("Status","0000");
            jsonObject.put("ResDes","成功");
        }else {
            jsonObject.put("Status","9999");
            jsonObject.put("ResDes","失败");
        }*/
        return null;
    }

}
